import 'package:flutter/material.dart';
import 'package:we_chat_app/chat/chat_message.dart';
import 'package:we_chat_app/const.dart';

class ChatPage extends StatefulWidget {

  @override
  State createState() {
    return ChatPageState();
  }
}

class ChatPageState extends State<ChatPage> {

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: const Text('消息'),
        centerTitle: true,
        backgroundColor: themeColor,
        actions: [
           PopupMenuButton(
            color: Color.fromRGBO(20, 20, 20, 0.5),
            offset: Offset(0,50),
            child: Container(
              child: Icon(Icons.add_circle_outline,color: Colors.green,),
              margin: EdgeInsets.only(right: 20),
            ),
            itemBuilder: (BuildContext context) {
            return <PopupMenuItem<String>>[
              PopupMenuItem(child: Text('发起群聊',style: TextStyle(color: Colors.white,fontSize: 16),)),
              PopupMenuItem(child: Text('扫一扫',style: TextStyle(color: Colors.white,fontSize: 16),)),
              PopupMenuItem(child: Text('添加好友',style: TextStyle(color: Colors.white,fontSize: 16),)),
              PopupMenuItem(child: Text('收付款',style: TextStyle(color: Colors.white,fontSize: 16),)),
            ];
          },),],
      ),
      body: ChatMessage(),
    );
  }
}
